package com.luhuiguo.cms.shared.event;

import java.util.List;

import com.google.gwt.event.shared.GwtEvent;

public class AttachmentsDeletedEvent extends GwtEvent<AttachmentsDeletedEventHandler> {

    public static Type<AttachmentsDeletedEventHandler> TYPE = new Type<AttachmentsDeletedEventHandler>();

    private final List<Long> articles;

    public AttachmentsDeletedEvent(List<Long> articles) {
        this.articles = articles;
    }

    public List<Long> getAttachments() {
        return articles;
    }

    @Override
    public Type<AttachmentsDeletedEventHandler> getAssociatedType() {
        return TYPE;
    }

    @Override
    protected void dispatch(AttachmentsDeletedEventHandler handler) {
        handler.onAttachmentsDeleted(this);
    }
}
